package com.wesley.decorator;

/**
 * <h1>概述</h1>
 * <p>详述</p>
 *
 * @Date: 2021/8/18
 */
public class DecoratorClient {
    public static void main(String[] args) {

        // 2份巧克力+1份牛奶的咖啡
        // 创你一份美式咖啡
        Drink longBlackCoffee = new LongBlackCoffee();
        // 添加一份牛奶
        longBlackCoffee = new Milk(longBlackCoffee);
        // 添加一份巧克力
        longBlackCoffee = new Chocolate(longBlackCoffee);
        // 又添加一份巧克力
        longBlackCoffee = new Chocolate(longBlackCoffee);

        System.out.println(longBlackCoffee.getDesc() +" 费用：" + longBlackCoffee.cost());

    }
}
